import request from '@/utils/axiosRequest.js'

// 分页获取轮播图列表
export function pageCarousel(params) {
  return request({
    url: '/api/app/carousel/page',
    method: 'get',
    params
  })
}

// 获取轮播图详情
export function getCarouselDetail(id) {
  return request({
    url: `/api/app/carousel/${id}`,
    method: 'get'
  })
}

// 添加轮播图
export function addCarousel(data) {
  return request({
    url: '/api/app/carousel',
    method: 'post',
    data
  })
}

// 更新轮播图
export function updateCarousel(data) {
  return request({
    url: '/api/app/carousel',
    method: 'put',
    data
  })
}

// 删除轮播图
export function deleteCarousel(id) {
  return request({
    url: `/api/app/carousel/${id}`,
    method: 'delete'
  })
}

// 更新轮播图状态
export function updateCarouselStatus(id, status) {
  return request({
    url: `/api/app/carousel/${id}/status/${status}`,
    method: 'put'
  })
} 